package com.hziee.mail.controller;

import com.hziee.mail.service.EvalService;
import com.hziee.mail.util.FormatReturn;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * @author ZX
 */

@RestController
@RequestMapping("eval")
public class EvalController extends FormatReturn {

    @Autowired
    private EvalService evalService;

    @GetMapping("/show_eval")
    public String showEval(HttpServletResponse response, String goodsId) {
        List<Map> list = evalService.showEval(goodsId);
        return ajaxReturn(response, 1, "success", list);
    }
}
